﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Epi;
using Epi.Data;
using CDC.SampleShell.Infrastructure;

namespace CDC.SampleShell.Domain
{
    /// <summary>
    /// An example Microsoft Access based record repository for use specifically alongside Epi Info 7.
    /// </summary>
    /// <remarks>
    /// Possible improvements are: Loading data where the column count > 200 (currently this is unimplemented
    /// and will throw an exception), better FindOne() implementation by leveraging ISpecification (currently 
    /// FindOne() allows only a Guid to get the single record), better code contracting, and having a single
    /// repository for each Form instead of a single repository for the whole project.
    /// </remarks>
    public sealed class RecordRepository : EntityRepositoryBase<Record>
    {
        #region Constructors
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="project">The Epi Info 7 project to attach</param>
        public RecordRepository(Project project)
            : base(project)
        {
        }
        #endregion // Constructors
    }
}
